home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 5 / Apprentice-Release5.iso / Source Code / Pascal / Snippets / SlotVBL 1.0 / SlotVBLTest.p < prev    next >
Encoding:
Text File  |  1996-05-11  |  516 b   |  40 lines  |  [TEXT/PJMM]

  1. program SlotVBLTest;
  2.  
  3.     uses
  4. {$IFC UNDEFINED THINK_PASCAL}
  5.         Types, QuickDraw,Events,
  6. {$ENDC}
  7.         MySlotVBL;
  8.  
  9.     var
  10.         g: Longint;
  11.  
  12. begin
  13.  
  14. {$IFC UNDEFINED THINK_PASCAL}
  15. {$ELSEC}
  16.     ShowText;
  17. {$ENDC}
  18.  
  19.     if noErr <> InstallVBL(GetMainDevice) then
  20.         begin
  21.             WriteLn('InstallVBL failed');
  22.             while not Button do
  23.                 ;
  24.             Halt;
  25.         end;
  26.  
  27.     SetVBLValue(0);
  28.     g := 0;
  29.  
  30.     repeat
  31.         while GetVBLValue = g do
  32.             ;
  33.         if g mod 6 = 0 then
  34.             Write(g : 5);
  35.         if g mod 60 = 0 then
  36.             WriteLn;
  37.         g := GetVBLValue;
  38.     until Button;
  39.     RemoveVBL;
  40. end.